#include <iostream>
#include <array>
#include <vector>
#include <string>
#include "set.hpp"
#include "map.hpp"

using namespace std;

int main()
{
	vector<int> v{ 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	set<int> t1(v);
	set<int> t2 = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	//set<int> t(v);
	/*array<int, 10> arr = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	for (auto e : arr)
	{
		t.insert(e);
	}*/

	t2.inorder();
	//cout << "check of RBtree: " << t.check() << endl;

	for (const auto& e : t1)
	{
		cout << e << endl;
	}
	
	cout << "###########################" << endl;

	map<int, string> m;
	m.insert(4, "si");
	m.insert(2, "er");
	m.insert(6, "liu");
	m.insert(1, "yi");
	m.insert(3, "san");
	m.insert(15, "shiwu");
	m.insert(7, "qi");
	m.insert(16, "shiliu");
	m.insert(14, "shisi");

	m.inorder();

	for (const auto& e : m)
	{
		cout << e << endl;
	}
	return 0;
}